<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.3  (Win32)">
	<META NAME="AUTHOR" CONTENT="jm224">
	<META NAME="CREATED" CONTENT="20080305;14100000">
	<META NAME="CHANGEDBY" CONTENT="Sean Fabri">
	<META NAME="CHANGED" CONTENT="20080310;14244672">
	<STYLE TYPE="text/css">
	<!--
		@page { size: 21cm 29.7cm; margin: 1.27cm }
		P { margin-bottom: 0.21cm; direction: ltr; color: #000000; line-height: 115%; widows: 2; orphans: 2 }
		P.western { font-family: "Calibri", sans-serif; font-size: 11pt; so-language: en-GB }
		P.cjk { font-family: "Times New Roman", serif; font-size: 11pt }
		P.ctl { font-family: "Calibri", sans-serif; font-size: 11pt; so-language: ar-SA }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-GB" TEXT="#000000" DIR="LTR">
<P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0.35cm; line-height: 100%">
<FONT SIZE=5><U>Software Engineering</U></FONT></P>
<P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0.35cm; line-height: 100%">
<FONT SIZE=5><U>House 6</U></FONT></P>
<P CLASS="western" STYLE="margin-bottom: 0.35cm; line-height: 100%"><FONT SIZE=4 STYLE="font-size: 16pt"><B>Document
Title: </B></FONT>HighLevelDesign.html</P>
<P CLASS="western" STYLE="margin-bottom: 0.35cm; line-height: 100%"><FONT SIZE=4 STYLE="font-size: 16pt"><B>Document
Version:</B></FONT><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: medium">
1.0</SPAN></FONT> (05.03.08)</P>
<P CLASS="western" STYLE="margin-bottom: 0.35cm; line-height: 100%"><FONT SIZE=4 STYLE="font-size: 16pt"><B>Document
Author: </B></FONT>Sean Fabri, Richard Moss, Ben Horsfall</P>
<P CLASS="western" STYLE="margin-bottom: 0.35cm; line-height: 100%"><FONT SIZE=4 STYLE="font-size: 16pt"><B>Audited
By: </B></FONT>Ben Jones</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4 STYLE="font-size: 16pt"><B>Introduction</B></FONT></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%">The high-level
design specification specifies the overall structure of how the
analysis model is to be implemented.</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4 STYLE="font-size: 16pt"><B>Architectural
Design</B></FONT></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><B>Release Plan</B></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%">The ID is to be used
as a reference in later documents.</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P CLASS="western" STYLE="margin-bottom: 0.35cm"><U>Core components</U></P>
<P CLASS="western" STYLE="margin-bottom: 0.35cm">The following items
should be completed for the initial release:</P>
<TABLE WIDTH=376 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=7 CELLSPACING=0>
	<COL WIDTH=34>
	<COL WIDTH=312>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P><B>ID</B></P>
		</TD>
		<TD WIDTH=312>
			<P><B>Subject</B></P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>100</P>
		</TD>
		<TD WIDTH=312>
			<P>GUI</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>101</P>
		</TD>
		<TD WIDTH=312>
			<P>Ordered/unordered lists</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>102</P>
		</TD>
		<TD WIDTH=312>
			<P>Definition lists</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>103</P>
		</TD>
		<TD WIDTH=312>
			<P>Headings</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>104</P>
		</TD>
		<TD WIDTH=312>
			<P>Preformatted text</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>105</P>
		</TD>
		<TD WIDTH=312>
			<P>Bold</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>106</P>
		</TD>
		<TD WIDTH=312>
			<P>Italic</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>107</P>
		</TD>
		<TD WIDTH=312>
			<P>Underline text</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>108</P>
		</TD>
		<TD WIDTH=312>
			<P>Single level of nested tables</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>109</P>
		</TD>
		<TD WIDTH=312>
			<P>Set font size</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>110</P>
		</TD>
		<TD WIDTH=312>
			<P>Set font colour</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>111</P>
		</TD>
		<TD WIDTH=312>
			<P>Set font face</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>112</P>
		</TD>
		<TD WIDTH=312>
			<P>Basic error logging &ndash; line number</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>113</P>
		</TD>
		<TD WIDTH=312>
			<P>String search</P>
		</TD>
	</TR>
</TABLE>
<P STYLE="margin-bottom: 0.35cm; font-style: normal"><BR><BR>
</P>
<P CLASS="western" STYLE="margin-bottom: 0.35cm"><U>Options</U></P>
<P CLASS="western" STYLE="margin-bottom: 0.35cm">The following items
will be completed if there is time, or in later versions:</P>
<TABLE WIDTH=376 BORDER=1 BORDERCOLOR="#000000" CELLPADDING=7 CELLSPACING=0>
	<COL WIDTH=34>
	<COL WIDTH=312>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P><B>ID</B></P>
		</TD>
		<TD WIDTH=312>
			<P><B>Subject</B></P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>201</P>
		</TD>
		<TD WIDTH=312>
			<P>Image rendering</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>202</P>
		</TD>
		<TD WIDTH=312>
			<P>PDF output</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>203</P>
		</TD>
		<TD WIDTH=312>
			<P>Greater level of nested tables &ndash; dependant on 108</P>
		</TD>
	</TR>
	<TR VALIGN=TOP>
		<TD WIDTH=34>
			<P ALIGN=CENTER>204</P>
		</TD>
		<TD WIDTH=312>
			<P>Error diagnosis &ndash; error type</P>
		</TD>
	</TR>
</TABLE>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><B>Partitioning</B></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%">A package was
created for the RendererNode; all classes within this class are a
subclass of TreeNode. A preliminary grouping of the nodes into
Alignment, Style, and List was created &ndash; this will be subject
to change as it is not clear at this stage if that will be useful to
implement, but it provides a more definite structure. Reference - the
MonospacedNode (the &lt;tt&gt; tag), HorizontalRuleNode, and
PlainNode(for other text formats to subclass) were omitted from
Analysis.</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><IMG SRC="HighLevelDesign_html_m3885c3f.png" NAME="graphics1" ALIGN=BOTTOM WIDTH=737 HEIGHT=864 BORDER=0></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%">Using packages
exploits partitioning and layers to set out a firm structure for the
software.</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%">The Composite design
pattern has some overlap with how we have structured the RendererNode
Package. The PlainNode would become a Leaf in the Composite design
pattern, and AlignmentNode and ListNode will be a composite of a
number of PlainNodes.</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><B>Layers</B></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%">The following image
gives a rough guide to how the classes are layered. At the moment the
Parser object does most of the control of the objects.</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><IMG SRC="HighLevelDesign_html_m317b5b6b.png" NAME="graphics2" ALIGN=BOTTOM WIDTH=696 HEIGHT=489 BORDER=0></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><B>Object Diagrams
and Sequence Diagram</B></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%">An object diagram
was originally included; this was later found to be wrong. 
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%">Notes on the
<I>Sequence Diagram</I> below:</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%">The GUI has 1
method, the open operation; this allows the Farmer to select a HTML
file to open. The GUI has 1 attribute, which is the display. The
Display consists of elements, be it text, tables, or whatever the
HTML file includes. The Parser takes a HTML file in its parse()
operation, this will then in turn create a Tree object and pass it
into the Renderer via the makeDisplay() operation. This operation
returns the display, which will then be returned to the GUI. If there
is an error in the HTML, the parser will create an error object and
pass it into the ErrorLog via createError(error : Error).</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><IMG SRC="HighLevelDesign_html_m473aa414.png" NAME="graphics3" ALIGN=BOTTOM WIDTH=429 HEIGHT=506 BORDER=0></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><B>Refined Class
Diagram</B></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%">After discussion
with the analysis team, we decided to refine the class diagram. This
involved adding a few more classes; ErrorLog, Error, Tree and
Display. (ErrorLog and Error are the replacement for the ErrorCatcher
class in Analysis). We also decided to package the RendererNode as
explained above.</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><IMG SRC="HighLevelDesign_html_m778f4728.png" NAME="graphics4" ALIGN=BOTTOM WIDTH=505 HEIGHT=387 BORDER=0></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4 STYLE="font-size: 16pt"><B>Common
Tactical Policy</B></FONT></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<UL>
	<LI><P STYLE="margin-bottom: 0cm; line-height: 100%">Use Eclipse IDE
	for final implementation.</P>
	<LI><P STYLE="margin-bottom: 0cm; line-height: 100%">Use one code
	style (eclipse can set a default &lsquo;clean up&rsquo; for code).</P>
	<LI><P STYLE="margin-bottom: 0cm; line-height: 100%">Private
	attributes, public operations. To promote good encapsulation.</P>
	<LI><P STYLE="margin-bottom: 0cm; line-height: 100%">Methods should
	raise appropriate exceptions where there is a danger of crashing the
	system (i.e. I/O).</P>
</UL>
<UL>
	<LI><P STYLE="margin-bottom: 0cm; line-height: 100%">It has not been
	explicitly noted in our document, but we have used two design
	patterns:</P>
	<LI><P STYLE="margin-bottom: 0cm; line-height: 100%">The Facade
	design pattern is used in the Parser class, as the RendererGUI only
	communicates with the Parser and the Parser delegates operations
	around to the other classes. 
	</P>
</UL>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><FONT SIZE=4 STYLE="font-size: 16pt"><B>Requirements
Cross-Reference</B></FONT></P>
<P STYLE="margin-bottom: 0cm; line-height: 100%"><BR>
</P>
<UL>
	<LI><P STYLE="margin-bottom: 0cm; line-height: 100%">Detailed
	throughout the document.</P>
</UL>
</BODY>
</HTML>